package com.zhuss.product.db.dao.ext;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.zhuss.bean.bo.product.train.SearchLineStrategyBo;
import com.zhuss.bean.unit.linesite.BoardBean;
import com.zhuss.bean.unit.linesite.DateBean;
import com.zhuss.bean.vo.product.train.DetailLineStrategyVo;
import com.zhuss.bean.vo.product.train.ListLineStrategyVo;
import com.zhuss.product.db.dao.gen.LineStrategyMapper;
import com.zhuss.product.db.entity.LineStrategy;

/**
 * @description: 线路策略数据库Dao
 * @author: zhushanshuo
 * @create: Mon Jan 04 09:51:07 CST 2021
 **/

@Mapper
public interface LineStrategyDao extends LineStrategyMapper {

	void create(LineStrategy record);

	void delete(LineStrategy record);

	List<ListLineStrategyVo> listAll();

	List<ListLineStrategyVo> listById(@Param("lineStrategyIdList") List<Long> lineStrategyIdList,
									  @Param("status") Integer status, @Param("now") Date now);

	List<LineStrategy> listByName(@Param("name") String name);

	List<ListLineStrategyVo> listByType(@Param("lineType") Integer lineType, @Param("status") Integer status, @Param("now") Date now);

	List<ListLineStrategyVo> list(SearchLineStrategyBo bo);

	Integer countList(SearchLineStrategyBo bo);

	DetailLineStrategyVo detail(@Param("lineStrategyId") Long lineStrategyId);

	//查询节假日配置表
	List<DateBean> holiday();

	int listByLineId(@Param("lineId") Long lineId, @Param("now") Date now);

    List<ListLineStrategyVo> selectByBoard(@Param("boardList") List<BoardBean> boardList,
										   @Param("strategyType") Integer strategyType, @Param("lineId") Long lineId,
										   @Param("startDate") Date startDate,  @Param("endDate") Date endDate);

}
